<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Check the distance between this color and another</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="imagickpixel.getindex.html">« ImagickPixel::getIndex</a></li>
      <li style="float: right;"><a href="imagickpixel.ispixelsimilarquantum.html">ImagickPixel::isPixelSimilarQuantum »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="class.imagickpixel.html">ImagickPixel</a></li>
    <li>Check the distance between this color and another</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="imagickpixel.ispixelsimilar" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ImagickPixel::isPixelSimilar</h1>
  <p class="verinfo">(PECL imagick 3 &gt;= 3.3.0)</p><p class="refpurpose"><span class="refname">ImagickPixel::isPixelSimilar</span> &mdash; <span class="dc-title">Check the distance between this color and another</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-imagickpixel.ispixelsimilar-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><strong>ImagickPixel::isPixelSimilar</strong></span>(<span class="methodparam"><span class="type"><a href="class.imagickpixel.html" class="type ImagickPixel">ImagickPixel</a></span> <code class="parameter">$color</code></span>, <span class="methodparam"><span class="type">float</span> <code class="parameter">$fuzz</code></span>): <span class="type">bool</span></div>

  <p class="para rdfs-comment">
   Checks the distance between the color described by this ImagickPixel
   object and that of the provided object, by plotting their RGB values
   on the color cube. If the distance between the two points is less than
   the fuzz value given, the colors are similar.
   This method replaces <a href="imagickpixel.issimilar.html" class="link">ImagickPixel::isSimilar()</a>
   and correctly normalises the fuzz value to ImageMagick QuantumRange.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-imagickpixel.ispixelsimilar-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt>
<code class="parameter">color</code></dt>

     <dd>

      <p class="para">
       The ImagickPixel object to compare this object against.
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">fuzz</code></dt>

     <dd>

      <p class="para">
       The maximum distance within which to consider these colors as similar.
       The theoretical maximum for this value is the square root of three
       (1.732).
      </p>
     </dd>

    
   </dl>

  </p>

 </div>

 <div class="refsect1 returnvalues" id="refsect1-imagickpixel.ispixelsimilar-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   成功时返回 <strong><code>true</code></strong>。
  </p>
 </div>


</div></div></div></body></html>